<?php
require_once( '../../../inc/header.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'design.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'profiles.inc.php' );
require_once( BX_DIRECTORY_PATH_INC . 'utils.inc.php' );
$utente=(int)$_COOKIE['memberID'];
$user_like=$_POST['nuser_like'];
$id_like=$_POST['nid_like'];
if ($user_like==$utente) {
$db = mysql_connect(DATABASE_HOST,DATABASE_USER,DATABASE_PASS);
mysql_query("SET NAMES 'utf8'");
 if ($db == FALSE)
 die ("errore di connessione");
 mysql_select_db(DATABASE_NAME,$db) or die ("errore selezione database");
 $query  = "DELETE FROM ibdw_likethis WHERE id_notizia=$id_like AND id_utente=$user_like";
 $result = mysql_query($query);
}
?>